Home

Operator Usage

Name

_=>

Description

op |ket> _=> sequence
non empty learn rule
if the sequence on the RHS is non-empty, then this is identical to a standard learn rule
however, if the RHS sequence is empty, then don't learn anything
frequently useful when you don't want to learn an empty ket |>
or, you don't want to over-write an existing learn rule if the sequence is empty.
Without this learn rule, you would require an "if do-you-know" wrapper around the learn rule.


Examples

-- an example of standard learn rule vs the non-empty learn rule:
-- first, the standard learn rule:
age |Fred> => |39>
age |Fred> => |>

-- now, the non-empty learn rule:
age |Sam> => |41>
age |Sam> _=> |>

-- now see what we know:
dump
    age |Fred> => |>
    age |Sam> => |41>

-- So we see, Fred's age has been over-written with the empty ket,
-- but Sam's has not.

-- But if we do want to update Sam's age,
-- then we use a non-empty sequence:
age |Sam> _=> |37>


See also

Operator type

learn rule